package com.wenson.behavior.memento;

/**
 * @ClassName: DocClient
 * @Author: luowangcheng
 * @Date: 2024/6/16 8:29
 * @Description:
 */
public class DocClient {
    public static void main(String[] args) {
        Editor editor = new Editor(new Doc("《AI的觉醒》"));
        editor.append("第一章 混沌初开");
        editor.append("\n   正文2000字……");
        editor.append("\n第二章 荒漠之花\n   正文3000字……");
        editor.delete();

        editor.undo();
        editor.redo();
    }
}
